import request from '@/utils/request'

// 查询文章管理列表
export function list(query) {
  return request({
    url: '/api/cms/content/list',
    method: 'get',
    params: query
  })
}

// 查询文章详细
export function getConfig(id) {
  return request({
    url: '/api/cms/content/' + id,
    method: 'get'
  })
}

// 新增参数配置
export function addConfig(data) {
  return request({
    url: '/api/cms/content/add',
    method: 'post',
    data: data
  })
}

// 修改参数配置
export function updateConfig(data) {
  return request({
    url: '/api/cms/content/update',
    method: 'put',
    data: data
  })
}

// 删除参数配置
export function delConfig(configId) {
  return request({
    url: '/api/cms/del/' + configId,
    method: 'delete'
  })
}
